<template>
  <div>
    <h1>HOME</h1>
    <el-button type="info" @click="logout">退出</el-button>
  </div>
</template>

<script>
export default {
  name: 'HomeView',
  methods: {
    logout: function () {
      // 清除 token
      window.sessionStorage.clear()
      // 条船到登录页
      this.$router.push('/login')
    }
  }
}
</script>

<style lang="less" scoped>

</style>
